import instance from '../utils/request'

// 注册
export const register = data => {
    const {
        enterpriseName,
        username,
        email,
        password,
        code,
        role,
    } = data
    return instance({
        url: '/register',
        method: 'POST',
        data: {
            enterpriseName,
            username,
            email,
            password,
            code,
            role,
        },
    })
}

// 获取验证码注册
export const sendCode = (email) => {
    return instance({
        url: '/sendCode',
        method: 'POST',
        data: {
            email
        }
    })
}